package com.project.study.farming.common.entity.dto;

import com.project.study.farming.common.entity.po.UserPo;
import com.project.study.farming.common.utils.CommonUtil;
import lombok.Builder;
import lombok.Data;

/**
 * 封装返回体
 * @param <T> 数据
 * @since 2020-04-15
 */
@Data
@Builder
public class BaseOutDto<T> {

    private UserPo user;

    private T t;

    public static <T> BaseOutDto<?> success(T t){
        return BaseOutDto.builder().user(CommonUtil.getUser()).t(t).build();
    }
}
